﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        if(!IsPostBack)
        {
            string identity = Session["Identity"].ToString();
            if (identity == "Developer")
                LabelUserIdentity.Text = "开发人员";
            else if (identity == "ProjectManager")
                LabelUserIdentity.Text = "项目经理";
            else if (identity == "Leader")
                LabelUserIdentity.Text = "管理员（领导）";


            LabelUserInfo.Text =Session["Name"].ToString();      
        }

        Panel1.Attributes.Add("onclick", "window.location.href='/UserLogin/PersonalInfo.aspx'");//面板点击页面跳转
    }

    protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
    {
        Session["SubProjectName"] = TextBoxSearch.Text.Trim();
        Response.Redirect("~/UserLogin/SearchResult.aspx");
    }
}
